home *** CD-ROM | disk | FTP | other *** search
/ Aminet 52 / Aminet 52 (2002)(GTI - Schatztruhe)[!][Dec 2002].iso / Aminet / dev / lang / amigatalk.lha / AmigaTalk.install < prev    next >
Text File  |  2002-01-28  |  10KB  |  334 lines

  1. ; -------------------------------------------------------
  2. ; Installer script for AmigaTalk V1.5+
  3. ; -------------------------------------------------------
  4.  
  5. (set #welcome "This is the installer for AmigaTalk!")
  6.  
  7. (set #wrongversion
  8. (cat "You have an old version of the program 'Installer' "
  9.      "on your Amiga!\n\n"
  10.      "The installation procedure needs at least Installer 42.9."
  11.      "\n\nPlease check your System & obtain a newer version!"
  12. ))
  13.  
  14. (set #general-help 
  15. (cat "The install script will copy all %s files &"
  16.      "directories to the destination that you specify."
  17.      "Then it will add an Assign AmigaTalk: Vol:destination/"
  18.      "statement to your User-Startup file located in the "
  19.      "S: directory."
  20. ))
  21.  
  22. (set #destdir-prompt "Select a Volume & Path where AmigaTalk will be added:")
  23.  
  24. (set #destdir-help   
  25. (cat "Select the volume that you wish to place AmigaTalk in."
  26.      "Then select a directory (if any) that will serve as a "
  27.      "parent for AmigaTalk.  Example:  Select DH0: as the volume,"
  28.      "then select a directory (such as Programs) & the installer"
  29.      "will make a directory called DH0:Programs/AmigaTalk, where"
  30.      "the AmigaTalk program will be placed."
  31. ))
  32.  
  33. (set #no-diskspace "To install AmigaTalk into '%s', you need at least %ld bytes of free harddrive space!")
  34.  
  35. (set #startup-prompt "An Assign has to be added to S:User-Startup for AmigaTalk.")
  36. (set #startup-help   "AmigaTalk won't work correctly without this!")
  37.  
  38.  
  39.  
  40. ;------------------------------------------------------------------------
  41. ; Cleanup any temporary mess we created
  42. (procedure CLEANUP
  43.     ; Nothing to cleanup
  44.     (delete (tackon @default-dest ".tempinstall") (all) (optional "force"))
  45. )   ; CLEANUP
  46.  
  47.  
  48. ;------------------------------------------------------------------------
  49. ; Obtain an installation path
  50. (procedure GETPATH #gp_default #gp_remdir #gp_msg #gp_help
  51.  
  52.     (set #gp_res "")
  53.     (while (= "" #gp_res)
  54.         (set #gp_res #gp_default)
  55.         (if (not (exists #gp_res (noreq)))
  56.           (
  57.             ; Surfer 1.1 Hack:
  58.             (if (= #gp_res "Work:")
  59.               (
  60.                 (set #gp_res "")
  61.                 (set #gp_default @default-dest)
  62.               )
  63.             ) ; if
  64.  
  65.           )
  66.         ) ; if
  67.  
  68.         (if (OR (= "" #gp_res) (= @user-level 2))
  69.           (
  70.             ; We had a problem. So we need to ask the user!
  71.             (set #gp_res
  72.                 (expandpath
  73.                     (askdir
  74.                         (prompt #gp_msg)
  75.                         (help #gp_help)
  76.                         (default #gp_default)
  77.                     )
  78.                 )
  79.             )
  80.           )
  81.         ) ; if
  82.  
  83.         ; If the directory does not exist, retry!
  84.         (if (<> "" #gp_res)
  85.           (
  86.             (if (not (exists #gp_res (noreq)))
  87.                 (set #gp_res "")
  88.             ) ; if
  89.           )
  90.         ) ; if
  91.     ) ; while
  92.  
  93.     ; return the result!
  94.     (set #gp_res #gp_res)
  95.  
  96. ) ; GETPATH
  97.  
  98. ;------------------------------------------------------------------------
  99. ; We can't handle this script without Installer 42.9 or better!
  100. (if (< @installer-version 2752521)
  101.   (
  102.     ; Big problem!
  103.     (message #wrongversion)
  104.     (exit (quiet))
  105.   )
  106. )
  107.  
  108. ; find out how the user wants to install things
  109. (welcome #welcome)
  110.  
  111. (complete 0)
  112.  
  113. ; First find the Destination base:
  114.  
  115. (set #ATalkDirBase (GETPATH "Work:" TRUE #destdir-prompt #destdir-help))
  116.  
  117. ; We have to create a drawer "AmigaTalk" there!
  118. (set #ATalkDir (tackon #ATalkDirBase "AmigaTalk"))
  119.  
  120. (set @default-dest #ATalkDir)
  121.  
  122. ; If this is a new installation, we check the diskspace!
  123.  
  124.     (if (not (exists @default-dest))
  125.       (
  126.         ; For a new setup, we should leave some space!
  127.         (if (< (getdiskspace #ATalkDirBase) 3000000)
  128.             (abort (#no-diskspace #ATalkDirBase 3000000))
  129.         )
  130.  
  131.         (makedir @default-dest)
  132.  
  133.         (set #ARexxDir (tackon @default-dest "ARexxScripts"))
  134.         (makedir #ARexxDir)
  135.  
  136.         (set #BrowserDir (tackon @default-dest "Browser"))
  137.         (makedir #BrowserDir)
  138.  
  139.         (set #CDir (tackon @default-dest "C"))
  140.         (makedir #CDir)
  141.  
  142.         (set #CodeLibDir (tackon @default-dest "CodeLib"))
  143.         (makedir #CodeLibDir)
  144.  
  145.         (set #ExamplesDir (tackon @default-dest "Examples"))
  146.         (makedir #ExamplesDir)
  147.  
  148.         (set #GeneralDir (tackon @default-dest "General"))
  149.         (makedir #GeneralDir)
  150.  
  151.         (set #HelpDir (tackon @default-dest "Help"))
  152.         (makedir #HelpDir)
  153.  
  154.         (set #ImageDir (tackon @default-dest "Images"))
  155.         (makedir #ImageDir)
  156.  
  157.         (set #IntuitionDir (tackon @default-dest "Intuition"))
  158.         (makedir #IntuitionDir)
  159.  
  160.         (set #PreludeDir (tackon @default-dest "Prelude"))
  161.         (makedir #PreludeDir)
  162.  
  163.         (set #SystemDir (tackon @default-dest "System"))
  164.         (makedir #SystemDir)
  165.  
  166.         (set #TestFilesDir (tackon @default-dest "TestFiles"))
  167.         (makedir #TestFilesDir)
  168.  
  169.         (set #UserDir (tackon @default-dest "User"))
  170.         (makedir #UserDir)
  171.  
  172.         (complete 9)
  173.  
  174.         (copyfiles (prompt  "Copying ARexxScripts...")
  175.                    (help    @copyfiles-help)
  176.                    (source  "ARexxScripts")
  177.                    (dest    #ARexxDir)
  178.                    (pattern "#?.rexx")
  179.                    (files)
  180.         )
  181.  
  182.         (copyfiles (prompt  "Copying Browser...")
  183.                    (help    @copyfiles-help)
  184.                    (source  "Browser")
  185.                    (dest    #BrowserDir)
  186.                    (pattern "#?")
  187.         )
  188.  
  189.         (copyfiles (prompt  "Copying C...")
  190.                    (help    @copyfiles-help)
  191.                    (source  "C")
  192.                    (dest    #CDir)
  193.                    (pattern "#?")
  194.         )
  195.  
  196.         (copyfiles (prompt  "Copying CodeLib...")
  197.                    (help    @copyfiles-help)
  198.                    (source  "CodeLib")
  199.                    (dest    #CodeLibDir)
  200.                    (pattern "#?")
  201.         )
  202.  
  203.         (copyfiles (prompt  "Copying Examples...")
  204.                    (help    @copyfiles-help)
  205.                    (source  "Examples")
  206.                    (dest    #ExamplesDir)
  207.                    (pattern "#?.(st|p)")
  208.         )
  209.  
  210.         (complete 25)
  211.  
  212.         (copyfiles (prompt  "Copying General...")
  213.                    (help    @copyfiles-help)
  214.                    (source  "General")
  215.                    (dest    #GeneralDir)
  216.                    (pattern "#?.st")
  217.         )
  218.  
  219.         (copyfiles (prompt  "Copying Help...")
  220.                    (help    @copyfiles-help)
  221.                    (source  "Help")
  222.                    (dest    #HelpDir)
  223.                    (pattern "#?")
  224.         )
  225.  
  226.         (copyfiles (prompt  "Copying Images...")
  227.                    (help    @copyfiles-help)
  228.                    (source  "Images")
  229.                    (dest    #ImageDir)
  230.                    (pattern "#?")
  231.         )
  232.  
  233.         (copyfiles (prompt  "Copying Intuition...")
  234.                    (help    @copyfiles-help)
  235.                    (source  "Intuition")
  236.                    (dest    #IntuitionDir)
  237.                    (pattern "#?.(st|p)")
  238.         )
  239.  
  240.         (complete 50)
  241.  
  242.         (copyfiles (prompt  "Copying Prelude...")
  243.                    (help    @copyfiles-help)
  244.                    (source  "Prelude")
  245.                    (dest    #PreludeDir)
  246.                    (pattern "#?")
  247.         )
  248.  
  249.         (copyfiles (prompt  "Copying System...")
  250.                    (help    @copyfiles-help)
  251.                    (source  "System")
  252.                    (dest    #SystemDir)
  253.                    (pattern "#?.(st|p)")
  254.         )
  255.  
  256.         (copyfiles (prompt  "Copying TestFiles...")
  257.                    (help    @copyfiles-help)
  258.                    (source  "TestFiles")
  259.                    (dest    #TestFilesDir)
  260.                    (pattern "#?")
  261.         )
  262.  
  263.         (copyfiles (prompt  "Copying User...")
  264.                    (help    @copyfiles-help)
  265.                    (source  "User")
  266.                    (dest    #UserDir)
  267.                    (pattern "#?")
  268.         )
  269.  
  270.         (complete 80)
  271.  
  272.         (copyfiles (prompt  "Copying Main files...")
  273.                    (help    @copyfiles-help)
  274.                    (source  "AmigaTalk.env")
  275.                    (dest    #ATalkDir)
  276.         )
  277.  
  278.         (copyfiles (prompt  "Copying Main files...")
  279.                    (help    @copyfiles-help)
  280.                    (source  "AmigaTalk.colors")
  281.                    (dest    #ATalkDir)
  282.         )
  283.  
  284.         (copyfiles (prompt  "Copying Main files...")
  285.                    (help    @copyfiles-help)
  286.                    (source  "AmigaTalk.info")
  287.                    (dest    #ATalkDir)
  288.         )
  289.  
  290.         (copyfiles (prompt  "Copying Main files...")
  291.                    (help    @copyfiles-help)
  292.                    (source  "AmigaTalk.readme")
  293.                    (dest    #ATalkDir)
  294.         )
  295.  
  296.         (copyfiles (prompt  "Copying Main files...")
  297.                    (help    @copyfiles-help)
  298.                    (source  "History.txt")
  299.                    (dest    #ATalkDir)
  300.         )
  301.  
  302.         (complete 83)
  303.  
  304.         (copyfiles (prompt  "Copying Main program...")
  305.                    (help    @copyfiles-help)
  306.                    (source  "AmigaTalk")
  307.                    (dest    #ATalkDir)
  308.                    (pattern "AmigaTalk")
  309.         )
  310.  
  311.         (complete 98)
  312.       )
  313.     )
  314.  
  315.  
  316. (startup    "AmigaTalk"
  317.    (prompt  "An Assign needs to be added to the \"S:user-startup\".")
  318.    (help    "AmigaTalk has to know where to find certain files.")
  319.    (command "Assign AmigaTalk: " #ATalkDir)
  320. )
  321.  
  322. ; If we have to add an Assign, we better create one right now
  323. (makeassign "AmigaTalk" #ATalkDir)
  324.  
  325. ;------------------------------------------------------------------------
  326. ; That's it!
  327.  
  328. (complete 100)
  329.  
  330. (CLEANUP)
  331. (exit)
  332.  
  333. (abort "Well, I tried!")
  334.